Mobile devices may be equipped with various sensors, such as an accelerometer, a gyroscope, and a magnetic field sensor, among others. The sensors are often fabricated to be small in size, so as to fit inside the small package provided by the mobile device. The sensors, at least from a functionality standpoint, may be essentially miniaturized versions of larger, more conventional electric and/or electro-mechanical sensors, and may be referred to as, or as part of, micro electro-mechanical systems (MEMS).
Applications executed on the mobile devices may interface with the sensors and obtain sensor data, such as heading, position, and/or angular or linear acceleration, therefrom. During operation, the applications may receive and translate the raw sensor readings to determine the attitude of the mobile device, based on predetermined calibration data or other translation algorithms. Such processed information may be used in the applications for a variety of purposes, for example, to determine a direction in which the device is proceeding (e.g., the direction in which a user carrying the phone is walking), or to input instructions, for example, to move a cursor left or right by tilting the device, or to provide commands, invoke functions, etc. by manipulating the attitude of the device (e.g., by shaking the device).
However, there are shortcomings in current sensor data acquisition techniques, especially when used indoors. The heading of the device indoors may be determined at least partially using magnetic (e.g., compass) information; however, the accuracy of such information is sensitive to ambient magnetic fields, such as those created by nearby electrical current. Such nearby electrical currents are common in indoor use, leading to reduced sensor accuracy.
Another way to determine heading uses the gyroscope and the accelerometer. However, the gyroscopic and/or linear acceleration information may vary quickly, and requires frequent refreshing. Further, to maintain acceptable feedback response times, the polling rate of the sensors is often high. However, the processing resources on the mobile devices are typically scarce when compared to larger computing devices, owing at least partially by reduced size and/or limited power supply. Accordingly, sharing the processor between running the application and providing high-frequency sampling may lead to significant update latency.
Accordingly, present systems suffer from one or more of high update latency, slow response times, and limited accuracy. What is needed, then, are improved systems and methods for detecting attitude in a mobile device.